<?php echo CHtml::scriptFile('assets/tiny_mce/tiny_mce.js'); ?>
<?php echo CHtml::scriptFile('assets/js/editor_tinymce.js'); ?>

<script type="text/javascript">
	tinymce_image("image_map");
	//tinymce_simple("fefooter");
	//tinymce_advanced("article_content");
</script>

<div class="content">
	<div class="content_i">
    	<div class="list_button">
        	<?php $this->widget("application.modules.system.widgets.ConfigWidget"); ?>
        </div>
    
	<?php
        if (strlen($message))
        {
            echo "<div style='padding:5px; width:650px;  height:15px; background-color:#d8e9ff; 
                border-top: 1px solid #3474c2; border-bottom: 1px solid #3474c2;'>";
            echo $message ;
            echo "</div>";
        }
    ?>
        
    <?php
		echo "<h2>";
		echo CHtml::image(Yii::app()->baseUrl."/assets/icon/icon-16-map.png");
		echo " <strong>Chọn Bản đồ</strong>";
		echo "</h2>";
		
        echo CHtml::beginForm(
			array($this->controller_id."/save_bando"),
			"post", 
			array("id" => "form_edit")
		);
		
		echo "<table cellpadding='3' cellspacing='0 border='0' width='85%'>";
			
			echo "<tr>";
				echo "<td class='label' width='120'>"."Bản đồ mặc định"."</td>";
				echo "<td>";
					$list_map = array(
						"image" => "Bản đồ ảnh",
						"google" => "Bản đồ google"
					);
					echo CHtml::dropDownList("default_map", $company["default_map"], $list_map);
				echo "</td>";
			echo "</tr>";
			
			echo "<tr>";
				echo "<td class='label' width='120'>"."Bản đồ ảnh"."</td>";
				echo "<td>";
					echo CHtml::textArea("image_map", $company["image_map"],
					 array('style'=>'width:505px; height:300px;'));
				echo "</td>";
			echo "</tr>";
			
			echo "<tr>";
				echo "<td class='label' width='120'>"."Bản đồ Google"."</td>";
				echo "<td>";
					echo CHtml::textArea("google_map", $company["google_map"],
					 array('style'=>'width:500px; height:180px;'));
				echo "</td>";
			echo "</tr>";

			echo "<tr>";
				echo "<td>"."</td>";
				echo "<td>";
					echo "<div class='space_5'></div>";
					
					echo 
						"<div class='button' id='button_submit'>" .
							"<div style='float:left; width:20px;'>" .
								CHtml::image(Yii::app()->baseUrl."/assets/icon/icon-16-save.png") .
							"</div>" .
							"<div style='float:left; min-width:40px;font-weight:bold'>".
								"Save" .
							"</div>" .
						"</div>";
						
						
					echo " ";
					
					echo 
						"<div class='button' id='button_cancel'>" .
							"<div style='float:left; width:20px;'>" .
								CHtml::image(Yii::app()->baseUrl."/assets/icon/icon-16-check.png") .
							"</div>" .
							"<div style='float:left; min-width:50px;font-weight:bold'>".
								"Reset" .
							"</div>" .
						"</div>";
						
				echo "</td>";
			echo "</tr>";
				
		echo "</table>";
		echo CHtml::endForm();
	?>
    </div>
</div><!-- end div right -->

<script language="javascript">
$(document).ready(function(){
	$('#button_submit').click(function(){
		$('#form_edit').submit();
	});
	
	$('#button_cancel').click(function(){
		//alert("asdasD");
		$('#form_edit')[0].reset();
	});
});
</script>
